package my.BLL;

import org.json.JSONObject;
import java.util.Date;
import android.content.Context;
import android.database.Cursor;
import android.util.Log;
import my.Common.DBType;
import my.Common.clsUtil;
import my.DAL.clsDal;

public class clsSQL
{
//region "Member Variables"	
	private clsDal m_dal;
	private Context m_context;

//region "Constructors"
	public clsSQL(Context context)
	{
		m_dal = new clsDal(context);
		m_context = context;
	}

	public clsSQL(Context context, clsDal dal)
	{
		m_dal = dal;
		m_context = context;
	}

	public void BeginStream()
	{
		m_dal.BeginStream();
	}

	public void EndStream()
	{
		m_dal.EndStream();
	}

//region "Public Methods"
	public Cursor SanPham_GetByMaSP(String MASP) throws Exception
    {        
        String[] strCommand =new String[] { m_context.getString(my.app.R.string.sp_SANPHAM_GetByKey)};        
        m_dal.AddInParameter(strCommand, "@CustID", DBType.String, MASP);
        return m_dal.ExecQuery(strCommand[0]);      
    }
	
}